package com.icloud.auth.api.feign;

import com.icloud.auth.api.vo.Oauth2TokenVo;
import com.icloud.common.core.api.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 认证feign连接
 */
@FeignClient(value = "icloud-auth", contextId = "authFeignClient")
public interface AuthFeignClient {
    /**
     * 获取oauth2授权信息
     */
    @PostMapping(value = "/oauth/token")
    CommonResult<Oauth2TokenVo> getAccessToken(@RequestParam Map<String, String> parameters);
}
